#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>

int main(void)
{
    int fd;
    int ret = 0;
    
    fd = open("new_file", O_CREAT, S_IRWXU | S_IRGRP | S_IROTH);
    if (-1 == fd) {
        printf("Error: Create new_file failed!\r\n");
        goto err1;
    }

    close(fd);

err1:
    close(fd);

    return ret;
}